﻿@model HeaderLinksModel
@using Nop.Web.Models.Common;


@*@Html.Action("Index","SideMenu",new { area = "" })*@
<div class="row">
    <div class="col-md-12 text-center">
        <ul class="menu-header-links">
            <li>
                @Html.Action("TaxTypeSelector", "Common")
            </li>
            <li>
                @Html.Action("CurrencySelector", "Common")
            </li>
            @Html.Action("LanguageSelector", "Common")
            @Html.Widget("header_links_before")
            @Html.Action("AdminHeaderLinks", "Common")
            @if (Model.IsAuthenticated)
            {
                <li>
                    <a href="@Url.RouteUrl("CustomerInfo")">
                        <span class="hidden-xs">@Model.CustomerEmailUsername</span>
                        <i class="hidden-lg hidden-md hidden-sm fa fa-user fa-1x" title="@Model.CustomerEmailUsername"></i>
                    </a>
                </li>
                <li>
                    <a href="@Url.RouteUrl("Logout")">
                        <span class="hidden-xs">@T("Account.Logout")</span>
                        <i class="hidden-lg hidden-md hidden-sm fa fa-sign-out fa-1x" title="@T("Account.Logout")"></i>
                    </a>
                </li>
            }
            else
            {
                <li>
                    <a href="@Url.RouteUrl("Register")">
                        <span class="hidden-xs">@T("Account.Register")</span>
                        <i class="hidden-lg hidden-md hidden-sm fa fa fa-pencil fa-1x" title="@T("Account.Register")"></i>
                    </a>
                </li>
                <li>
                    <a href="@Url.RouteUrl("Login")">
                        <span class="hidden-xs">@T("Account.Login")</span>
                        <i class="hidden-lg hidden-md hidden-sm fa fa-sign-in fa-1x" title="@T("Account.Login")"></i>
                    </a>
                </li>
            }
            @if (Model.AllowPrivateMessages)
            {
                <li>
                    <a href="@Url.RouteUrl("PrivateMessages", new { tab = "" })">
                        <span class="hidden-xs">@T("PrivateMessages.Inbox")</span>
                        <i class="hidden-lg hidden-md hidden-sm fa fa-inbox fa-1x" title="@T("PrivateMessages.Inbox")"></i>
                        <span>@Model.UnreadPrivateMessages</span>
                    </a>
                </li>
                if (!string.IsNullOrEmpty(Model.AlertMessage))
                {
                    <script type="text/javascript">
                        $(document).ready(function () {
                            $('#notificationModal').modal('show');
                        });
                    </script>
                }
            }
            @if (Model.ShoppingCartEnabled)
            {
                <li id="topcartlink" class="dropdown">
                    <a href="@Url.RouteUrl("ShoppingCart")" class="hidden-md hidden-lg">
                        <span class="cart-label hidden-xs">@T("ShoppingCart")</span>
                        <i class="hidden-lg hidden-md hidden-sm fa fa-shopping-cart fa-1x" title="@T("ShoppingCart")"></i>
                        <span class="cart-qty">@T("ShoppingCart.HeaderQuantity", Model.ShoppingCartItems)</span>
                    </a>
                    <a href="@Url.RouteUrl("ShoppingCart")" class="dropdown-toggle visible-md visible-lg" data-toggle="dropdown" data-hover="dropdown">
                        <span class="cart-label">@T("ShoppingCart")</span>
                        <span class="cart-qty">@T("ShoppingCart.HeaderQuantity", Model.ShoppingCartItems)</span>
                        <i class="fa fa-angle-down"></i>
                    </a>
                    <ul class="dropdown-menu">
                        <li>@Html.Action("FlyoutShoppingCart", "ShoppingCart")</li>
                    </ul>
                </li>
            }
            @if (Model.WishlistEnabled)
            {
                <li>
                    <a href="@Url.RouteUrl("Wishlist")">
                        <span class="cart-label hidden-xs">@T("Wishlist")</span>
                        <i class="hidden-lg hidden-md hidden-sm fa fa-star fa-1x" title="@T("Wishlist")"></i>
                        <span class="wishlist-qty">@T("Wishlist.HeaderQuantity", Model.WishlistItems)</span>
                    </a>
                </li>
            }
            @Html.Widget("header_links_after")
        </ul>
    </div>
</div>

@*Notification window*@
<div class="modal fade" id="notificationModal" tabindex="-1" role="dialog" aria-labelledby="notificationModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="notificationModalLabel">@T("Common.Notification")</h4>
            </div>
            <div class="modal-body">
                @Html.Raw(HttpUtility.JavaScriptStringEncode(Model.AlertMessage))
            </div>
        </div>
    </div>
</div>
